package com.szeastroc.core.service.system;

import com.github.pagehelper.PageInfo;
import com.szeastroc.common.query.BaseQuery;
import com.szeastroc.core.base.service.BaseService;
import com.szeastroc.core.bean.system.SystemUser;

public interface SystemUserService extends BaseService<SystemUser>{

    /**
     * 根据用户名获取用户并且获取用户的角色与权限
     * @param userName
     * @return
     */
    public SystemUser selectByUserName(String userName);


    public PageInfo<SystemUser>  selectPage(BaseQuery query);


    public void setUserRole(Integer userId,Integer roleId,Integer oldRoleId);
    
    public SystemUser selectByNameAndPassword(String userName,String password);
    
    public void deleteUser(Integer userId,Integer roleId);

    public void saveUser(SystemUser user);
}
